package com.qqtech.qquan.user.model;

import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import com.qqtech.core.common.util.StringUtil;

@SuppressWarnings("serial")
public class UserMessageVo extends UserMessage {

	@Override
	public String toString() {
		return ToStringBuilder.reflectionToString(this, ToStringStyle.MULTI_LINE_STYLE);
	}

	public java.lang.String getFromName() {
		return fromName;
	}

	public void setFromName(java.lang.String fromName) {
		this.fromName = fromName;
	}

	/**
	 * 留言者名称
	 */
	private java.lang.String fromName;
	/**
	 * 留言者头象
	 */
	private java.lang.String fromLogo;

	/**
	 * 留言者头像全URL example: http://192.168.1.xxx:8080/circle/1.png
	 * 
	 * @return
	 */
	public java.lang.String getFullFromImg() {
		if (StringUtil.isBlank(this.getFromLogo())) {
			return "";
		} else if (this.getFromLogo().indexOf("source://") > -1) {
			return this.getFromLogo();
		} else {
			return super.getFileDomain() + "" + this.getFromLogo();
		}
	}

	public java.lang.String getFromLogo() {
		return fromLogo;
	}

	public void setFromLogo(java.lang.String fromLogo) {
		this.fromLogo = fromLogo;
	}
}